//
//  InvoiceClaimListCellNew.m
//  NtoccShipper
//
//  Created by mac on 2020/6/11.
//  Copyright © 2020 zhuchongjin. All rights reserved.
//

#import "InvoiceClaimListCellNew.h"
@interface InvoiceClaimListCellNew()
@property (nonatomic,strong) CJImageView *imgVselect;
@property (nonatomic,strong) CJLabel *labMainOrderNumber;
//@property (nonatomic,strong) CJLabel *labBillingType;
@property (nonatomic,strong) CJLabel *labShipper;
@property (nonatomic,strong) CJLabel *labConsigneer;
@property (nonatomic,strong) CJLabel *labCoalName;
@property (nonatomic,strong) CJLabel *labPayStatus;
@property (nonatomic,strong) CJLabel *labShipperPhone;
@property (nonatomic,strong) CJLabel *labConsigneerPhone;
@property (nonatomic,strong) CJLabel *labPrice;
@property (nonatomic,strong) CJLabel *labOpenInviocePrice;
@end
@implementation InvoiceClaimListCellNew

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setCellInfoModel:(InvoiceClaimListModel *)model{
    
     self.labMainOrderNumber.text = CJStringWithFormat(@"运输单号:%@",model.orderCode);
//    billingType 0-现付开票，1-到付开票，2-代付开票
//    switch (model.billingType) {
//        case 0:
//            self.labBillingType.text = @"现付开票";
//            break;
//        case 1:
//            self.labBillingType.text = @"到付开票";
//            break;
//        case 2:
//            self.labBillingType.text = @"代付开票";
//            break;
//        default:
//            break;
//    }
    
    if (model.selected) {
          self.imgVselect.image = [UIImage imageNamed:@"zcj_selectedCir"];
      }else{
          self.imgVselect.image = [UIImage imageNamed:@"zcj_unSelectedCir"];
      }
    
    self.labShipper.text = model.shipperName;
    self.labConsigneer.text = model.consigneeName;
    self.labCoalName.text = model.coalTypeName;
//    0 未支付 1- 已支付待处理 2-支付成功 3-支付失败）
//    item.getStatus() == 1 ? "已接单" : item.getStatus() == 2 ?
//    "已装货" : item.getStatus() == 3 ? "已卸货" : item.getStatus() == 4 ? "已核算" : "已完成"
    switch (model.status) {
        case 1:
            self.labPayStatus.text = @"已接单";
            break;
        case 2:
            self.labPayStatus.text = @"已装货";
            break;
        case 3:
            self.labPayStatus.text = @"已卸货";
            break;
        case 4:
            self.labPayStatus.text = @"已核算";
            break;
        default:
            self.labPayStatus.text = @"已完成";

            break;
    }
    self.labShipperPhone.text = model.shipperPhone;
    self.labConsigneerPhone.text = model.consigneePhone;
    self.labPrice.text = @(model.taxPrice).cj_money_description;
    self.labOpenInviocePrice.text = @(model.shipperDeliveryFee).cj_money_description;
    
}
//{
//    taxPrice = 13,
//    accountCheckAuthStatus = 0,
//    driverCode = "8bc586b246074bb4985f227f85659284",
//    loadQuantity = 0,
//    deliveryOilFee = 0,
//    insureRate = 0,
//    invoiceCodeDriver = "da54257d223540f2834faa2cf2a4d4e7",
//    orderCode = "1906041008450064",
//    shipperAddress = "山东省临沂市兰山区",
//    id = "3015",
//    gmtModified = "2019-06-04 10:17:58",
//    isLoadingConfirm = 1,
//    createdBy = "68bd3018ccb240dea9d87093f10f9409",
//    deliveryFeeDeserved = 100.17,
//    dispatchOrderCode = "1906041008051202",
//    invoiceStatusDriver = 1,
//    price = 14.31,
//    weight = 7,
//    insureImg = "",
//    invoiceCode = "",
//    coalName = "超长",
//    loadPlace = "",
//    code = "86fed4b78578487e8d34b23ce5c50deb",
//    abnormalImg = "",
//    fundErrMsg = "",
//    isInsure = 0,
//    isShipmentComment = 0,
//    cancelType = 0,
//    mainOrderNumber = "1906040948391969",
//    coalTypeName = "",
//    payStatus = 0,
//    fillTime = "2019-06-04 10:15:47",
//    isCuikuan = 0,
//    modifiedBy = "95d0f4c9cb6d436c81f1cc24fd9b2504",
//    abnormalFee = 0,
//    isTrunk = 0,
//    wastage = 0,
//    infoFee = 0,
//    isSendFund = 0,
//    isUnloadingConfirm = 1,
//    isCancel = 0,
//    shipmentCode = "95d0f4c9cb6d436c81f1cc24fd9b2504",
//    mainOrderCode = "928ce273b4c44dfa8f4af2ca6bebebc4",
//    shipperDeliveryFee = 0,
//    isDriverComment = 0,
//    unloadQuantity = 0,
//    accountCheckInfoAuthStatus = 0,
//    gmtCreated = "2019-06-04 10:08:06",
//    contractStatus = 1,
//    unloadPlace = "",
//    isCash = 0,
//    businessTypeCode = "1003999",
//    payAmount = 0,
//    isSign = 1,
//    payOil = 0,
//    insureNum = "",
//    branchCode = "27adb23841d547b8ae6f0c11481b4cfd",
//    isAbnormal = 0,
//    abnormalRemark = "",
//    accountCheckUserCode = "",
//    inFee = 0,
//    monthlySettlementStatus = 0,
//    taxFee = 0,
//    shipperPhone = "17756000003",
//    insurePrice = 0,
//    isSend = 0,
//    companyCode = "95d0f4c9cb6d436c81f1cc24fd9b2504",
//    accountStatus = 0,
//    receiptNum = "",
//    loadWeight = 7,
//    isFill = 1,
//    accountCheckUpAuthStatus = 0,
//    driverApplyRemark = "",
//    invoiceStatus = 0,
//    cashDeposit = 0,
//    applyStatus = 0,
//    coalType = "qitata",
//    isReceiptReturn = 1,
//    deliveryCashFee = 0,
//    isSettle = 0,
//    isTransfer = 0,
//    shipperDealRemark = "",
//    receiptImg = "",
//    consigneeAddress = "江苏省苏州市张家港市",
//    status = 3,
//    deliveryFeePractical = 0,
//    accountCheckCode = "",
//    unloadWeight = 7,
//    vehicleCode = "88312664a2cf44e2930744f2202c36be",
//    consigneeName = "顾瑶",
//    errMsg = "",
//    billingType = 0,
//    consigneePhone = "13562982917",
//    insuranceFee = 0,
//    signTime = "2019-06-04 10:20:00",
//    upstreamCode = "",
//    isUnloadingComfirmDate = "2019-06-06 13:15:04",
//    insuranceAmount = 0,
//    taxPayFee = 0,
//    shipperName = "顾瑶企业",
//    payType = 0,
//}

- (void)btnblockSeclectAction{
    if (self.blockSeclect) {
        self.blockSeclect(@"");
    }
}
@end

